<template>
  <div class="order-submit">
    <div>
      <select-address />
    </div>
    <div class="order-body">
      <div class="product-img">
        <img src alt />
        <div class="product-img-header">
          <span>
            <span>影楼级高端相册</span>
            <span>¥218.00</span>
          </span>
          <div class="header-sbu">
            <span>场景通用模版，浅灰册</span>
            <span>场景通用模版，浅灰册</span>
            <span>场景通用模版，浅灰册</span>
          </div>
        </div>
      </div>
      <div class="product-item">
        <div class="item-tilte">购买数量</div>
        <div class="item-val">
          <nut-stepper
            :simple="false"
            :readonly="true"
            :value.sync="munValue"
            @change="handleChangeVal"
          />
        </div>
      </div>
      <div class="product-item">
        <div class="item-tilte">相册名称</div>
        <div class="item-val">
          <span @click="handleGetName">
            未命名
            <i class="iconfont makerarrow-right"></i>
          </span>
        </div>
      </div>
      <div class="product-item">
        <div class="item-tilte">印刷方式</div>
        <div class="item-val">激光冲印</div>
      </div>
      <div class="product-item">
        <div class="item-tilte">棉花券</div>
        <div class="item-val">
          <span @click="handleGetName">
            1张可用
            <i class="iconfont makerarrow-right"></i>
          </span>
        </div>
      </div>
    </div>
    <div class="order-body">
      <div class="product-item">
        <div class="item-tilte">商品总价</div>
        <div class="item-val">
          <i class="iconfont makerqian">1212</i>
        </div>
      </div>
      <div class="product-item">
        <div class="item-tilte">运费</div>
        <div class="item-val">+￥ 1212</div>
      </div>
    </div>
    <div class="order-submit-btn">
      <span>￥124.3425</span>
      <nut-button class="submit-order" shape="circle">提交订单</nut-button>
    </div>
    <nut-popup class="nut-popup" v-model="cottomShow">
      <div class="nut-popup-title">相册名称</div>
      <div>
        <nut-textinput
          class="my-input"
          type="search"
          v-model="photoAlbumName"
          placeholder="请输入搜索内容"
          @keyup.enter="submitName"
        />
      </div>
      <div>
        <nut-buttongroup>
          <nut-button class="cancel-btn">取消</nut-button>
          <nut-button class="confirm-btn">确定</nut-button>
        </nut-buttongroup>
      </div>
    </nut-popup>
  </div>
</template>

<script>
import SelectAddress from './components/SelectAddress';
export default {
  name: 'PrintConfirmation',
  components: {
    SelectAddress,
  },
  data() {
    return {
      munValue: 1,
      cottomShow: false, // 开启,关闭相册命名弹框
      photoAlbumName: null,
    };
  },
  methods: {
    //获取相册名称
    submitName() {},
    // 命名相册
    handleGetName() {
      this.cottomShow = true;
    },
    handleChangeVal() {},
  },
};
</script>

<style scoped lang="scss">
.order-submit {
  width: 100vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  // justify-content: center;
  .order-body {
    margin-top: 10px;
    width: 88vw;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px 3vw;
    .product-img {
      display: flex;
      justify-content: flex-start;
      margin-bottom: 2vh;
      img {
        width: 21vw;
        height: 21vw;
        border-radius: 4px;
        overflow: hidden;
        background-color: pink;
      }
      .product-img-header {
        flex: 1;
        margin-left: 10px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-content: center;
        & > span:first-child {
          font-size: 16px;
          color: #1e1e1e;
          display: flex;
          justify-content: space-between;
          font-weight: bolder;
        }
        .header-sbu {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-content: center;
          font-size: 12px;
          color: #b3b3b3;
          height: 7vh;
        }
      }
    }
    .product-item {
      height: 5vh;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .item-tilte {
        font-size: 16px;
        color: #1e1e1e;
        font-weight: bolder;
      }
      .item-val {
        color: #b3b3b3;
        font-size: 14px;
        & > span {
          color: #ff7e00;
        }
      }
    }
  }
  .nut-popup {
    // width: 90vw;
    height: 20vh;
    padding: 10vw;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .nut-popup-title {
      font-size: 16px;
      font-weight: bolder;
      color: #1e1e1e;
      height: 10vh;
    }
    form {
      margin-bottom: 10px;
    }
    & > div {
      margin: 3vw 0;
      .nut-button {
        width: 30vw;
        font-size: 16px;
        background: transparent;
        padding: 0;
        text-align: center;
        height: 20px;
      }
      .cancel-btn {
        color: #343434;
        border-right: 1px solid #cccccc;
      }
      .confirm-btn {
        color: #ff7e00;
      }
    }
  }
  .order-submit-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8vh;
    background-color: #ffffff;
    padding: 0 10vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FF7E00;
    font-weight: bolder;
    font-size: 20px;
    .submit-order {
      background: #FF7E00;
    }
  }
}
</style>
